package com.imicode.hotel.service;

import java.util.List;

import com.imicode.hotel.dao.FoodTypeDao;
import com.imicode.hotel.dao.impl.FoodTypeC3p0Impl;
import com.imicode.hotel.vo.FoodType;

public class FoodTypeService {
	
//	private FoodTypeDao typeDao = new FoodTypeDaoImpl();
//	private FoodTypeDao typeDao = new FoodTypeDbutilsImpl();
	private FoodTypeDao typeDao = new FoodTypeC3p0Impl();
	
	public void save(String name) {
		typeDao.save(name);
	}
	
	public List<FoodType> list(String name) {
		return typeDao.list(name);
	}
	
	public FoodType get(int id) {
		return typeDao.get(id);
	}
	
	public void edit(int id, String name) {
		typeDao.edit(id, name);
	}
	
	public void delete(int id) {
		typeDao.delete(id);
	}

}
